package com.leoman.dao;

import com.leoman.entity.PaperImage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * PaperImageDao
 * Created by 涂奕恒 on 2017/2/9 0009 14:47.
 */
public interface PaperImageDao extends JpaRepository<PaperImage, Integer>, JpaSpecificationExecutor<PaperImage> {

    @Query("select a from PaperImage a where a.type = ?1")
    List<PaperImage> findListByType(Integer type);
}